package org.jeecg.modules.fund.util;

import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

public class FundAchievementUtil {
    /**
     * 从AKTools 获取基金业绩数据
     * @param code
     * @return
     */
    public static JSONArray getHttpData(String code){
        // AKTools 获取基金业绩数据
        try {
            String res = HttpUtil.get("http://127.0.0.1:8080/api/public/fund_individual_achievement_xq?symbol=" + code);
            return JSONArray.parseArray(res);
        }catch (Exception e){
            return null;
        }
    }
}
